<?=$system_message;?>
<div class="alert-box secondary">Siblings <a href="<?=site_url('user/parentlogin#parent-login');?>">View All Login Accounts.</a></div>
<div style="margin-top:1px;margin-bottom:1px;" class="pagination  pagination-mini  pagination-centered">
	<ul>
	<?foreach($a_z as $v):?>
		<li><a href="<?=site_url($p_link.'/'.$v);?>"  class="<?=$active==$v?'btn btn-inverse btn-mini':'';?>">
			<strong><?=strtoupper($v);?></strong></a>
		</li>
	<?endforeach;?>
	</ul>
	<hr>
	<a href="<?=site_url('user/allparentlogin')?>" class="btn btn-small btn-primary confirm" title="Warning! This action will register and send email to all parents. Do you want to continue?" ><i class="fa fa-refresh"></i>&nbsp; Register All Parent's Login Account</a>
	<?=@$pagnatelinks;?>
</div>

<?if($siblings):?>
	<table class="table table-stripped">
		<?foreach($siblings as $key => $val):?>
			<?foreach($val as $k => $v):?>
				<tr>
					<td style="font-size:15px;font-weight:bold;"><?=ucwords(strtolower($k));?></td>
					<td class="table-ul">
						<?foreach($v as $fathername => $values):?>
							<ul>
								<?if($values['children']):?>
										<li class="title"><?=ucwords(strtolower($fathername)).' , '.ucwords(strtolower($values['mother']));?></li>
									<?foreach($values['children'] as $sk => $sv):?>
									<?$enrollment_ids[md5($values['mother'])][] = $sk?>
										<li><a href="<?=site_url('profile/student/'.$sk);?>" target="_blank"><?=ucwords(strtolower($sv));?></a></li>
									<?endforeach;?>
										<?
											$e_ids = array_map('intval',$enrollment_ids[md5($values['mother'])]);
										?>
										<li style="padding:4px;"><a href="<?=site_url('user/generate_parent_login/'.__link_array($e_ids));?>" class="btn btn-mini btn-inverse ajax-click" title="Are you sure you want to create a student login for this parent/student?" data-other-message="Account login already generated for this parent." data-fail-message="Unable to create user login. Please try again." data-success-message="Successfully created student and parent login." data-disable-container="ul">Create Parent Login</a></li>
								<?else:?>

								<?endif;?>
							</ul>
						<?endforeach;?>
					</td>
				</tr>
			<?endforeach;?>
		<?endforeach;?>
	</table>
<?else:?>
<div class="alert-box secondary">Nothing Found.</div>
<?endif;?>

<script type="text/javascript" src="<?=script_url('custom/ajaxclick');?>"></script>